﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true" CodeBehind="ResetPassword.aspx.cs" Inherits="PeachLite.Admin.ResetPassword" %>

<asp:Content ID="c1" ContentPlaceHolderID="cphHead" ClientIDMode="Static" runat="server">
    <script type="text/javascript" src="js/md5.js"></script>
    <script type="text/javascript">
        function resetpwd() {
            var pwd1 = $("#pwd1").val() ? $("#pwd1").val() : "";
            var pwd2 = $("#pwd2").val() ? $("#pwd2").val() : "";
            var pwd3 = $("#pwd3").val() ? $("#pwd3").val() : "";
            if (pwd1 == "") {
                alert("旧密码不能为空！");
                return;
            }
            if (pwd2 == "") {  
                alert("新密码不能为空！");
                return;
            }

            if(pwd3 ==  ""){
                alert("确认密码不能为空！");
                return;
            }

            if (pwd2 != pwd3) {
                alert("新密码与确认密码不一致！");
                return;
            }
            fx({ pwd1: hex_md5(pwd1), pwd2: hex_md5(pwd2), c: AJAXCODE.ResetPWD, r: Math.random() }, function (data) {
                if (data.Success) {
                    $("#btnclear").click();
                }
            });
        }
    </script>
</asp:Content>

<asp:Content ID="c2" ContentPlaceHolderID="cphMain" ClientIDMode="Static" runat="server">
    <div class="box box1">   
        <div class="hd">
            <div class="tit">
                <i class="iconfont">&#xf084;</i>
                <span>修改密码</span>
            </div>
        </div>
        <div class="bd repwd">
            <ul class="fm fm1 clearfix">
                <li>
                    <dl>
                        <dt>旧密码：</dt>
                        <dd>
                            <input class="txt" type="password" id="pwd1" placeholder="旧密码" />
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>新密码：</dt>
                        <dd>
                            <input class="txt" type="password" id="pwd2" placeholder="新密码" />
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>确认密码：</dt>
                        <dd>
                            <input class="txt" type="password" id="pwd3" placeholder="确认密码" />
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>&nbsp;</dt>
                        <dd class="op clearfix">
                            <input class="btn btn1" type="reset" id="btnclear" value="重置"/>
                            <input class="btn btn2" type="button" value="确认修改" onclick="resetpwd();" />
                        </dd>
                    </dl>
                </li>
            </ul>

        </div>
    </div>
</asp:Content>